// StatisticsTableDlg.cpp : implementation file
//

#include "stdafx.h"
#include "backManage.h"
#include "StatisticsTableDlg.h"
#include "backManageDlg.h"


// CStatisticsTableDlg dialog

IMPLEMENT_DYNAMIC(CStatisticsTableDlg, CMaxDisplayDlg)

CStatisticsTableDlg::CStatisticsTableDlg(CWnd* pParent /*=NULL*/)
	: CMaxDisplayDlg(CStatisticsTableDlg::IDD, pParent)
{

}


CStatisticsTableDlg::~CStatisticsTableDlg()
{
}

void CStatisticsTableDlg::DoDataExchange(CDataExchange* pDX)
{
	CMaxDisplayDlg::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CStatisticsTableDlg, CMaxDisplayDlg)
	ON_MESSAGE(RCV_MSG+STATISTICS_DLG_ID, &CStatisticsTableDlg::OnNetMessage)
END_MESSAGE_MAP()


// CStatisticsTableDlg message handlers

BOOL CStatisticsTableDlg::OnInitDialog()
{
	CMaxDisplayDlg::OnInitDialog();

	MSGWnd msgwnd;
	msgwnd.hwnd=GetSafeHwnd();
	msgwnd.index=0;
	RegisterNetMsg(&msgwnd, STATISTICS_DLG_ID);
	m_hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
	// Create the ToolTip control.
	m_tooltip.Create(this);
	m_tooltip.Activate(TRUE);
	m_tooltip.SetPopupSound(NULL);
	m_tooltip.AddTool(GetDlgItem(IDC_EDIT_EPY_NAME), IDS_MENU_EDIT_NAME);
	UpdateData(false);
	return TRUE; 

}


LRESULT CStatisticsTableDlg::OnNetMessage(WPARAM wParam, LPARAM lParam)
{
	u8 *buf=(u8 *) wParam;
	u32 n=(u32) lParam;

	u32 cmd;
	memcpy(&cmd, buf, sizeof(cmd));

	switch(cmd)
	{
		case CMD_RADDMENU:
			//RxAddNewMenu((CMDRes *)(buf+sizeof(cmd)));
			break;
			
		default:
			break;
	}


	return 0;
}

BOOL CStatisticsTableDlg::PreTranslateMessage(MSG* pMsg)
{
	// CG: The following block was added by the ToolTips component.
	{
		// Let the ToolTip process this message.
		m_tooltip.RelayEvent(pMsg);

		return CMaxDisplayDlg::PreTranslateMessage(pMsg);
	}
}


